#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
    int second = 0;
    scanf("%d", &second);
    int hours = second / 3600;
    int minutes = (second % 3600) / 60;
    int seconds = (second % 3600) % 60;
    printf("%d %d %d\n", hours, minutes, seconds);

    return 0;
}